//
//  CustomPullToRefresh.h
//  PullToRefreshDemo
//
//  Created by John Wu on 3/22/12.
//  Copyright (c) 2012 TFM. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MSPullToRefreshController.h"

@protocol CustomPullToRefreshDelegate;

@interface CustomPullToRefresh : NSObject <MSPullToRefreshDelegate> {
    UIView *_pullTop;
    UIActivityIndicatorView *_gearTop;
    UIImageView *_arrowTop;
    UIImageView *_pullBot;
    UIView *_arrowBot;
    UIActivityIndicatorView *_gearBot;
    MSPullToRefreshController *_ptrc;
//    UIScrollView *_scrollView;
    
    id <CustomPullToRefreshDelegate> _delegate;
}

@property (assign, nonatomic) Boolean enablePullToBottom;
- (id) initWithScrollView:(UIScrollView *)scrollView delegate:(id <CustomPullToRefreshDelegate>)delegate;
- (void) endRefresh;
- (void) startRefresh;

@end

@protocol CustomPullToRefreshDelegate <NSObject>

- (void) customPullToRefreshShouldRefresh:(CustomPullToRefresh *)ptr withDirection:(MSRefreshDirection)direction;

@end